package GameMain.UIControl
{
	import Engine.UIControl.Button;
	
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class HallButton extends Button
	{
		private var _backFun:Function = null;
		private var _arg:Object = null;
		
		public function HallButton(p_content:Sprite)
		{
			super(p_content);
			this.setMoveState(false);
			this.setMouseInState(false);
		}
		
		public function setEnterFun(fun:Function):void
		{
			this._backFun = fun;
		}
		
		override public function setOnClickParam(param:Object):void
		{
			super.setOnClickParam(param);
			this._arg = param;
		}
		
		override protected function _onMouseIn(event:MouseEvent):void
		{
			super._onMouseIn(event);
			this._backFun(this._arg);
		}
		
		override protected function onMouseOut(event:MouseEvent):void
		{
			this._backFun(13);
		}
	}
}